package core.types;

public class SimpleType implements Type {

	private PrimitiveType primitiveType;

	public SimpleType(PrimitiveType primitiveType) {
		this.primitiveType = primitiveType;
	}

	public void setPrimitiveType(PrimitiveType primitiveType) {
		this.primitiveType = primitiveType;
	}
	
	public PrimitiveType getPrimitiveType() {
		return primitiveType;
	}

	@Override
	public boolean equals(Object obj) {
		if (!(obj instanceof SimpleType)) {
			return false;
		}

		SimpleType other = (SimpleType) obj;

		return this.primitiveType.equals(other.primitiveType);
	}

	@Override
	public String toString() {
		return primitiveType.toString();
	}

}
